package cn.ulyer.generator.util;

import java.util.Locale;

public class JdbcTypeUtil {


    public static String getJavaTypeByJdbcType(String jdbcType){
        String type = jdbcType.toLowerCase(Locale.ROOT);
        switch (type){
            case "int":
            case "number":
            case"tinyint":
                return "Integer";
            case"decimal":
                return "Double";
            case"varchar":
            case"varchar2":
            case"text":
            case"longvarchar":
            case"nvarchar":
            case"nchar":
            case"char":
            case"longtext":
            case"mediumtext":
                return "String";
            case"bigint":
                return "Long";
            case"date":
            case"datetime":
            case"time":
            case"timestamp":
                return "Date";
            default:
                return "Object";
        }

    }


}
